3.4.56 \(\int \frac {\log (x)}{x^2 (a+b x+c x^2)} \, dx\) [356]

3.4.56.1 Optimal result
3.4.56.2 Mathematica [A] (verified)
3.4.56.3 Rubi [A] (verified)
3.4.56.4 Maple [B] (verified)
3.4.56.5 Fricas [F]
3.4.56.6 Sympy [F(-1)]
3.4.56.7 Maxima [F(-2)]
3.4.56.8 Giac [F]
3.4.56.9 Mupad [F(-1)]

3.4.56.1 Optimal result

Integrand size = 18, antiderivative size = 251 \[ \int \frac {\log (x)}{x^2 \left (a+b x+c x^2\right )} \, dx=-\frac {1}{a x}-\frac {\log (x)}{a x}-\frac {b \log ^2(x)}{2 a^2}+\frac {\left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (1+\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a^2}+\frac {\left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (1+\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a^2}+\frac {\left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \operatorname {PolyLog}\left (2,-\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a^2}+\frac {\left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \operatorname {PolyLog}\left (2,-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a^2} \]

output
-1/a/x-ln(x)/a/x-1/2*b*ln(x)^2/a^2+1/2*ln(x)*ln(1+2*c*x/(b+(-4*a*c+b^2)^(1 
/2)))*(b+(2*a*c-b^2)/(-4*a*c+b^2)^(1/2))/a^2+1/2*polylog(2,-2*c*x/(b+(-4*a 
*c+b^2)^(1/2)))*(b+(2*a*c-b^2)/(-4*a*c+b^2)^(1/2))/a^2+1/2*ln(x)*ln(1+2*c* 
x/(b-(-4*a*c+b^2)^(1/2)))*(b+(-2*a*c+b^2)/(-4*a*c+b^2)^(1/2))/a^2+1/2*poly 
log(2,-2*c*x/(b-(-4*a*c+b^2)^(1/2)))*(b+(-2*a*c+b^2)/(-4*a*c+b^2)^(1/2))/a 
^2
 
3.4.56.2 Mathematica [A] (verified)

Time = 0.26 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.02 \[ \int \frac {\log (x)}{x^2 \left (a+b x+c x^2\right )} \, dx=\frac {-\frac {2 a}{x}-\frac {2 a \log (x)}{x}-b \log ^2(x)+\left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{b-\sqrt {b^2-4 a c}}\right )+\left (b+\frac {-b^2+2 a c}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{b+\sqrt {b^2-4 a c}}\right )+\left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \operatorname {PolyLog}\left (2,\frac {2 c x}{-b+\sqrt {b^2-4 a c}}\right )+\left (b+\frac {-b^2+2 a c}{\sqrt {b^2-4 a c}}\right ) \operatorname {PolyLog}\left (2,-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a^2} \]

input
Integrate[Log[x]/(x^2*(a + b*x + c*x^2)),x]
 
output
((-2*a)/x - (2*a*Log[x])/x - b*Log[x]^2 + (b + (b^2 - 2*a*c)/Sqrt[b^2 - 4* 
a*c])*Log[x]*Log[(b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(b - Sqrt[b^2 - 4*a*c])] 
+ (b + (-b^2 + 2*a*c)/Sqrt[b^2 - 4*a*c])*Log[x]*Log[(b + Sqrt[b^2 - 4*a*c] 
 + 2*c*x)/(b + Sqrt[b^2 - 4*a*c])] + (b + (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c]) 
*PolyLog[2, (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])] + (b + (-b^2 + 2*a*c)/Sqrt[b 
^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*a^2)
 
3.4.56.3 Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2804, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\log (x)}{x^2 \left (a+b x+c x^2\right )} \, dx\)

\(\Big \downarrow \) 2804

\(\displaystyle \int \left (\frac {\log (x) \left (-a c+b^2+b c x\right )}{a^2 \left (a+b x+c x^2\right )}-\frac {b \log (x)}{a^2 x}+\frac {\log (x)}{a x^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\left (\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}+b\right ) \operatorname {PolyLog}\left (2,-\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a^2}+\frac {\left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \operatorname {PolyLog}\left (2,-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a^2}+\frac {\log (x) \left (\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}+b\right ) \log \left (\frac {2 c x}{b-\sqrt {b^2-4 a c}}+1\right )}{2 a^2}+\frac {\log (x) \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \log \left (\frac {2 c x}{\sqrt {b^2-4 a c}+b}+1\right )}{2 a^2}-\frac {b \log ^2(x)}{2 a^2}-\frac {1}{a x}-\frac {\log (x)}{a x}\)

input
Int[Log[x]/(x^2*(a + b*x + c*x^2)),x]
 
output
-(1/(a*x)) - Log[x]/(a*x) - (b*Log[x]^2)/(2*a^2) + ((b + (b^2 - 2*a*c)/Sqr 
t[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*a^2) + 
 ((b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b + Sqrt[b 
^2 - 4*a*c])])/(2*a^2) + ((b + (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*PolyLog[2, 
 (-2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*a^2) + ((b - (b^2 - 2*a*c)/Sqrt[b^2 
 - 4*a*c])*PolyLog[2, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*a^2)
 

3.4.56.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2804
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{ 
u = ExpandIntegrand[(a + b*Log[c*x^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] / 
; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]
 
3.4.56.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(551\) vs. \(2(227)=454\).

Time = 1.18 (sec) , antiderivative size = 552, normalized size of antiderivative = 2.20

method result size
default \(-\frac {b \ln \left (x \right )^{2}}{2 a^{2}}+\frac {\frac {\ln \left (x \right ) \left (\ln \left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) \sqrt {-4 c a +b^{2}}\, b -2 \ln \left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) a c +\ln \left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b^{2}+\ln \left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) \sqrt {-4 c a +b^{2}}\, b +2 \ln \left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) a c -\ln \left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b^{2}\right )}{2 \sqrt {-4 c a +b^{2}}}+\frac {\operatorname {dilog}\left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) \sqrt {-4 c a +b^{2}}\, b -2 \operatorname {dilog}\left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) a c +\operatorname {dilog}\left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b^{2}+\operatorname {dilog}\left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) \sqrt {-4 c a +b^{2}}\, b +2 \operatorname {dilog}\left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) a c -\operatorname {dilog}\left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b^{2}}{2 \sqrt {-4 c a +b^{2}}}}{a^{2}}+\frac {-\frac {\ln \left (x \right )}{x}-\frac {1}{x}}{a}\) \(552\)
risch \(-\frac {b \ln \left (x \right )^{2}}{2 a^{2}}+\frac {\ln \left (x \right ) \ln \left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 a^{2}}-\frac {\ln \left (x \right ) \ln \left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) c}{a \sqrt {-4 c a +b^{2}}}+\frac {\ln \left (x \right ) \ln \left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b^{2}}{2 a^{2} \sqrt {-4 c a +b^{2}}}+\frac {\ln \left (x \right ) \ln \left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 a^{2}}+\frac {\ln \left (x \right ) \ln \left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) c}{a \sqrt {-4 c a +b^{2}}}-\frac {\ln \left (x \right ) \ln \left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b^{2}}{2 a^{2} \sqrt {-4 c a +b^{2}}}+\frac {\operatorname {dilog}\left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 a^{2}}-\frac {\operatorname {dilog}\left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) c}{a \sqrt {-4 c a +b^{2}}}+\frac {\operatorname {dilog}\left (\frac {-2 x c +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b^{2}}{2 a^{2} \sqrt {-4 c a +b^{2}}}+\frac {\operatorname {dilog}\left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 a^{2}}+\frac {\operatorname {dilog}\left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) c}{a \sqrt {-4 c a +b^{2}}}-\frac {\operatorname {dilog}\left (\frac {2 x c +\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b^{2}}{2 a^{2} \sqrt {-4 c a +b^{2}}}-\frac {\ln \left (x \right )}{a x}-\frac {1}{a x}\) \(608\)

input
int(ln(x)/x^2/(c*x^2+b*x+a),x,method=_RETURNVERBOSE)
 
output
-1/2*b*ln(x)^2/a^2+1/a^2*(1/2*ln(x)*(ln((-2*x*c+(-4*a*c+b^2)^(1/2)-b)/(-b+ 
(-4*a*c+b^2)^(1/2)))*(-4*a*c+b^2)^(1/2)*b-2*ln((-2*x*c+(-4*a*c+b^2)^(1/2)- 
b)/(-b+(-4*a*c+b^2)^(1/2)))*a*c+ln((-2*x*c+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a 
*c+b^2)^(1/2)))*b^2+ln((2*x*c+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)) 
)*(-4*a*c+b^2)^(1/2)*b+2*ln((2*x*c+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^( 
1/2)))*a*c-ln((2*x*c+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*b^2)/(- 
4*a*c+b^2)^(1/2)+1/2*(dilog((-2*x*c+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2) 
^(1/2)))*(-4*a*c+b^2)^(1/2)*b-2*dilog((-2*x*c+(-4*a*c+b^2)^(1/2)-b)/(-b+(- 
4*a*c+b^2)^(1/2)))*a*c+dilog((-2*x*c+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2 
)^(1/2)))*b^2+dilog((2*x*c+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*( 
-4*a*c+b^2)^(1/2)*b+2*dilog((2*x*c+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^( 
1/2)))*a*c-dilog((2*x*c+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*b^2) 
/(-4*a*c+b^2)^(1/2))+1/a*(-1/x*ln(x)-1/x)
 
3.4.56.5 Fricas [F]

\[ \int \frac {\log (x)}{x^2 \left (a+b x+c x^2\right )} \, dx=\int { \frac {\log \left (x\right )}{{\left (c x^{2} + b x + a\right )} x^{2}} \,d x } \]

input
integrate(log(x)/x^2/(c*x^2+b*x+a),x, algorithm="fricas")
 
output
integral(log(x)/(c*x^4 + b*x^3 + a*x^2), x)
 
3.4.56.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\log (x)}{x^2 \left (a+b x+c x^2\right )} \, dx=\text {Timed out} \]

input
integrate(ln(x)/x**2/(c*x**2+b*x+a),x)
 
output
Timed out
 
3.4.56.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {\log (x)}{x^2 \left (a+b x+c x^2\right )} \, dx=\text {Exception raised: ValueError} \]

input
integrate(log(x)/x^2/(c*x^2+b*x+a),x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for 
 more deta
 
3.4.56.8 Giac [F]

\[ \int \frac {\log (x)}{x^2 \left (a+b x+c x^2\right )} \, dx=\int { \frac {\log \left (x\right )}{{\left (c x^{2} + b x + a\right )} x^{2}} \,d x } \]

input
integrate(log(x)/x^2/(c*x^2+b*x+a),x, algorithm="giac")
 
output
integrate(log(x)/((c*x^2 + b*x + a)*x^2), x)
 
3.4.56.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\log (x)}{x^2 \left (a+b x+c x^2\right )} \, dx=\int \frac {\ln \left (x\right )}{x^2\,\left (c\,x^2+b\,x+a\right )} \,d x \]

input
int(log(x)/(x^2*(a + b*x + c*x^2)),x)
 
output
int(log(x)/(x^2*(a + b*x + c*x^2)), x)